/*
 * Copyright (c) 2013-2018 上海汇数数据. All rights reserved.
 * @(#) Recording.java 2018-08-10 22:41
 */

package cn.jh.common.core.data.domain;

import java.time.LocalDateTime;


/**
 * Interface for recording entities. Allows storing and retrieving created date
 * and modification date.
 *
 * @author fuchun
 * @since 1.0
 */
public interface Recording {

    /**
     * {@code CREATED_DATE} property name.
     */
    String PROP_CREATED_AT = "createdAt";

    /**
     * {@code LAST_MODIFIED_DATE} property name.
     */
    String PROP_UPDATED_AT = "updatedAt";

    /**
     * Returns the creation date of the entity.
     *
     * @return the createdAt
     */
    LocalDateTime getCreatedAt();

    /**
     * Sets the creation date of the entity.
     *
     * @param createdAt the creation date to set
     */
    void setCreatedAt(LocalDateTime createdAt);

    /**
     * Returns the date of the last modification.
     *
     * @return the updatedAt
     */
    LocalDateTime getUpdatedAt();

    /**
     * Sets the date of the last modification.
     *
     * @param updatedAt the date of the last modification to set
     */
    void setUpdatedAt(LocalDateTime updatedAt);
}
